<template>
  <div class="home-skeleton">
    <div v-for="i in 4" :key="i"
         :style="{backgroundColor: bg}"
         class="item">
      <XtxSkeleton animated bg="#e4e4e4" height="306px" width="306px"></XtxSkeleton>
      <XtxSkeleton animated bg="#e4e4e4" height="24px" width="160px"></XtxSkeleton>
      <XtxSkeleton animated bg="#e4e4e4" height="24px" width="120px"></XtxSkeleton>
    </div>
  </div>
</template>

<script>


export default {
  name: 'HomeSkeleton',
  props: {
    bg: {
      type: String,
      default: '#fff'
    }
  }
}
</script>

<style lang="less" scoped>
.home-skeleton {
  width: 1240px;
  height: 406px;
  display: flex;
  justify-content: space-between;

  .item {
    width: 306px;

    .xtx-skeleton ~ .xtx-skeleton {
      display: block;
      margin: 16px auto 0;
    }
  }
}
</style>
